//
//  DataStore.swift
//  SwiftUiBaseStudy
//
//  Created by Daniel on 2023/11/8.
//

import SwiftUI

class DataStore:ObservableObject {
    
    @Published var posts:[Post] = []
    
    init() {
        getPost()
    }
    
    func getPost()  {
        Api().getPosts{ data in
            self.posts = data
        }
    }
}
